﻿using AtentoFramework2008.Infrastructure.Persistence;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace NStore.Infrastructure.Tests
{
    [TestClass]
    public class BaseTest
    {
        [AssemblyInitialize]
        public static void AssemblyInitialize(TestContext testContext)
        {
            NHibernateSessionManager.Instance.CreateDatabase();
        }

        [TestCleanup]
        public void TestCleanup()
        {
            CloseSessionWithRollback();
        }

        public void CloseSessionWithRollback()
        {
            NHibernateSessionManager.Instance.CloseSession(false);
        }
    }
}
